package com.itheima.mapper;

import com.itheima.pojo.AddressBook;
import com.itheima.vo.AddressBookVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author :WuJunJie
 * packageName :com.itheima.mapper
 * fileName :AddressBookMapper
 * creationTime :2022-11-28 12:33
 */
@Mapper
public interface AddressBookMapper {
    Integer insertAddressBook(@Param("addressBook") AddressBook addressBook);

    List<AddressBook> selectAddressBooks(@Param("userId") String userId);

    AddressBook selectAddressBookById(@Param("id") String id, @Param("userId") String userId);

    Integer updateAddressBooks(@Param("addressBook") AddressBook addressBook);

    Integer updateAddressBooksByIds(@Param("ids") List<String> ids,@Param("userId") String userId);

    Integer setDefaultAddressBooks(@Param("addressBook") AddressBook addressBook);

    AddressBook selectByIsDefault(String getid);
}
